package com.ruoyi.erp.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.CustomerMapper;
import com.ruoyi.erp.domain.Customer;
import com.ruoyi.erp.service.ICustomerService;

/**
 * erp人员档案Service业务层处理
 * 
 * @author ztj
 * @date 2023-04-28
 */
@Service
public class CustomerServiceImpl implements ICustomerService 
{
    @Autowired
    private CustomerMapper customerMapper;

    /**
     * 查询erp人员档案
     * 
     * @param cCusCode erp人员档案主键
     * @return erp人员档案
     */
    @Override
    public Customer selectCustomerByCCusCode(String cCusCode)
    {
        return customerMapper.selectCustomerByCCusCode(cCusCode);
    }

    /**
     * 查询erp人员档案列表
     * 
     * @param customer erp人员档案
     * @return erp人员档案
     */
    @Override
    public List<Customer> selectCustomerList(Customer customer)
    {
        return customerMapper.selectCustomerList(customer);
    }

    /**
     * 新增erp人员档案
     * 
     * @param customer erp人员档案
     * @return 结果
     */
    @Override
    public int insertCustomer(Customer customer)
    {
        return customerMapper.insertCustomer(customer);
    }

    /**
     * 修改erp人员档案
     * 
     * @param customer erp人员档案
     * @return 结果
     */
    @Override
    public int updateCustomer(Customer customer)
    {
        return customerMapper.updateCustomer(customer);
    }

    /**
     * 批量删除erp人员档案
     * 
     * @param cCusCodes 需要删除的erp人员档案主键
     * @return 结果
     */
    @Override
    public int deleteCustomerByCCusCodes(String[] cCusCodes)
    {
        return customerMapper.deleteCustomerByCCusCodes(cCusCodes);
    }

    /**
     * 删除erp人员档案信息
     * 
     * @param cCusCode erp人员档案主键
     * @return 结果
     */
    @Override
    public int deleteCustomerByCCusCode(String cCusCode)
    {
        return customerMapper.deleteCustomerByCCusCode(cCusCode);
    }
}
